<include file="public@header"/>
</head>
<body>
<div class="wrap">
 
    <div class="row">

        <div class="col-md-12">
            <form class="well form-inline" method="post" action="{:url('store/admin_store/user_card')}">
                结算状态:
                <select class="form-control" name="is_jiesuan" style="width: 140px;">
                    <option value="0" <eq name="is_jiesuan" value="0">selected</eq>>全部</option>
                    <option value="1" <eq name="is_jiesuan" value="1">selected</eq>>已结算</option>
                    <option value="2" <eq name="is_jiesuan" value="2">selected</eq>>未结算</option>
                </select>
                订单号:
                <input type="text" class="form-control" name="order_no" style="width: 200px;" value="{$order_no|default=''}" placeholder="请输入订单号">
                用户手机号:
                <input type="text" class="form-control" name="mobile" style="width: 200px;" value="{$mobile|default=''}" placeholder="请输入手机号">
                <button class="btn btn-primary">搜索</button>
            </form>
            <div class="tab-content">
                <table class="table table-hover table-bordered">
                    <thead>
                    <tr>
                        <th>订单号</th>
                        <th>卡类型</th>                       
                        <th>关联店铺</th>

                        <th>用户</th>
                        <th>售价</th>
                        <th>有效期</th>
                        <th>支付状态</th>
                        <th>结算状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <empty name="tj_cards">
                    <tr>
                        <td colspan="9" style="text-align: center">暂无推荐会员卡订单</td>
                    </tr>
                    </empty>
                    <notempty name="tj_cards">
                        <foreach name="tj_cards" item="vo">
                            <tr>
                            <td>{$vo.order_no}</td>
                            <td>
                                <eq name="vo['type']" value="1"> 七天卡</eq>
                                <eq name="vo['type']" value="2"> 半年卡</eq>
                                <eq name="vo['type']" value="3"> 年卡</eq>
                                <eq name="vo['type']" value="4"> 股东年卡</eq>
                                 <eq name="vo['type']" value="5"> 免费卡</eq>
                            </td>
                              <td>
                              		<php>$store_info=cmf_get_store($vo['store_id']);</php>
                                {$store_info.store_name}
                              </td>
                            <td>{$vo.mobile}</td>
                            <td>{:round($vo['price'], 2)}</td>
                            <td>{:date('Y-m-d H:i:s',$vo['start_time'])} 至 {:date('Y-m-d H:i:s',$vo['end_time'])}</td>
                            <td>
                                <eq name="vo['pay_status']" value="0"> 未支付</eq>
                                <eq name="vo['pay_status']" value="1"> 已支付</eq>
                            </td>
                            <td>
                                <eq name="vo['is_jiesuan']" value="0"> 未结算</eq>
                                <eq name="vo['is_jiesuan']" value="1"> 已结算</eq>
                            </td>
                                <td>
                                    <eq name="vo['is_jiesuan']" value="0">
                                        <a href="{:url('store/admin_store/card_jiesuan',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn btn btn-success">结算</a>
                                    </eq>
                                    <eq name="vo['is_jiesuan']" value="1">
                                        <button class="btn btn-error">已结算</button>
                                    </eq>
                                </td>
                            </tr>
                        </foreach>
                    </notempty>
                    </tbody>
                </table>
<ul class="pagination">{$pages}</ul>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>